#include <gtest/gtest.h>
#include "../sample/navigation_task.h"
#include "../sample/battery_level_check.h"
#include "../sample/docking_task.h"
#include "scheduler/abstract_scheduler.h"
#include "scheduler/sequence_scheduler.h"
#include "scheduler/fallback_scheduler.h"
#include "scheduler/reactive_if_then_else_scheduler.h"
#include "scheduler/scheduler_factory.h"
#include "task/task_factory.h"

using namespace task;
using namespace scheduler;

TEST(test_type_utils, test_type_utils_sequence_scheduler_to_string)
{
    auto sequence_scheduler = SchedulerFactory<SequenceScheduler>::createScheduler("test_sequence_scheduler");
    auto fallback_scheduler = SchedulerFactory<FallbackScheduler>::createScheduler("test_fallback_scheduler");
    auto navigation_task = TaskFactory<NavigationTask>::createTask("navigation_task");

    fallback_scheduler->appendTask(navigation_task);
    sequence_scheduler->appendScheduler(fallback_scheduler);

    printf("%s\n", sequence_scheduler->toString().c_str());
}

TEST(test_type_utils, test_type_utils_reactive_scheduler_to_string)
{
    auto scheduler = SchedulerFactory<ReactiveIfThenElseScheduler>::createScheduler("test_reactive_scheduler");
    printf("%s\n", scheduler->toString().c_str());
}
